﻿Public Class NhanVien_DAL
    Dim cn As New ConnectDB()
    Public Function load_infonv(ByVal p As NhanVien_DTO) As DataTable
        Dim Nparameter As Integer = 1
        Dim name As String() = New String(Nparameter - 1) {}
        Dim value As Object() = New Object(Nparameter - 1) {}
        name(0) = "@taikhoannv"
        value(0) = p._taikhoannv
        Return cn.loadData("load_nhanvien", name, value, Nparameter)
    End Function
    Public Function change_PW(ByVal p As NhanVien_DTO)
        Dim Nparameter As Integer = 3
        Dim name As String() = New String(Nparameter - 1) {}
        Dim value As Object() = New Object(Nparameter - 1) {}
        name(0) = "@taikhoan"
        value(0) = p._taikhoannv

        name(1) = "matkhau"
        value(1) = p.matkhau

        name(2) = "matkhaumoi"
        value(2) = p._matkhaumoi


        Return cn.loadData("doimk", name, value, Nparameter)
    End Function
End Class
